package org.oak.repository.impl;

import org.oak.model.User;
import org.oak.repository.UserRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * org.oak.repository.impl.UserRepositoryImpl
 *
 * @author ZRS
 * @version V1.0
 * @since 2025/10/29 18:33
 */
@Repository
public class UserRepositoryImpl implements UserRepository {


    @Override
    public Optional<User> findById(Long id) {
        User user = new User();
        user.setId(id);
        return Optional.of(user);
    }

    @Override
    public User save(User user) {
        user.setName("name" + user.getId());
        return user;
    }

    @Override
    public void deleteById(Long id) {

    }
}
